package com.groot.springbootmybatis.controller;

import com.groot.springbootmybatis.pojo.ExampleDemoVO;
import com.groot.springbootmybatis.service.ExampleDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: spring-boot-mybatis
 * @description:
 * @author: SnailThink
 * @create: 2020-07-14 15:26
 **/
@RestController
@RequestMapping(value = {"/springboot"})
public class MybatisController {
	@Autowired
	ExampleDemoService service;
	@GetMapping("/mybatis")
	public void hello() {
	List<ExampleDemoVO> list= service.getExampleList();
		System.out.println("获取到的数据为:"+list.size());
	}
}
